/*
 +----------------------------------------------------------------------
 + Title        : outpatient
 + Author       : huwl
 + Version      : 1.0.0
 + Initial-Time : 2023-08-10
 + Last-time    : 这个文件最后修改的时间 + 修改人的名称
 + Desc         : 科室接口
 +----------------------------------------------------------------------
*/

import type { OutpatientListResult, OutpatientParams, OutpatientTreeResult } from '@/types/outpatient'
import {http} from '@/utils/httpRequest'

/**
 * 科室列表,请求方式[get]
 * 
 * @param OutpatientListParams data ----------------------------请求参数
 * @returns Promise<OutpatientListResult>
 * @author huwl
 */
export const reqGetOutpatientListAPI = (data?: OutpatientParams) => {
    return http<OutpatientListResult>({
        method: 'GET',
        url: 'outpatient/list',
        data
    })
}

/**
 * 科室树,请求方式[get]
 * 
 * @param OutpatientListParams data ----------------------------请求参数
 * @returns Promise<OutpatientTreeResult>
 * @author huwl
 */
export const reqGetOutpatientTreeAPI = (data?: OutpatientParams) => {
    return http<OutpatientTreeResult>({
        method: 'GET',
        url: 'outpatient/getOutpatientTree',
        data
    })
}